﻿using SXICE.Core.Domains;
using SXICE.Core.Models;
using SXICE.Core.Models.DTOs;
using SXICE.Core.Models.Search;
using SXICE.IService.Models;

namespace SXICE.IService
{
    /// <summary>
    /// 医生服务接口
    /// </summary>
    public interface IDoctorService
    {

        /// <summary>
        /// 获取用户信息，进行验证
        /// </summary>
        /// <param name="doctorDto"></param>
        /// <returns></returns>
        ReturnResult<DoctorDTO> GetUser(DoctorDTO doctorDto);

        /// <summary>
        /// 注册
        /// </summary>
        /// <param name="doctor">用户数据</param>
        /// <returns></returns>
        ReturnResult<bool> Register(Doctor doctor);

        /// <summary>
        /// 搜索医生
        /// </summary>
        /// <param name="pageListQuery">查询条件</param>
        /// <returns>结果</returns>
        ReturnPageListResult<DoctorDTO> Search(PageListQuery<RecordSearchModel> pageListQuery);

        /// <summary>
        /// 获取对应Id医生
        /// </summary>
        /// <param name="id">医生Id</param>
        /// <returns>结果</returns>
        ReturnResult<DoctorDTO> GetOneById(int id);

        /// <summary>
        /// 更新医生数据
        /// </summary>
        /// <param name="doctor">要更新的医生</param>
        /// <returns>结果</returns>
        ReturnResult<bool> Update(Doctor doctor);

        /// <summary>
        /// 更新角色
        /// </summary>
        /// <param name="doctor">要更新角色的医生</param>
        /// <returns>结果</returns>
        ReturnResult<bool> UpdateRole(Doctor doctor);

        /// <summary>
        /// 删除
        /// </summary>
        /// <param name="id">医生id</param>
        /// <param name="state">状态</param>
        /// <returns>结果</returns>
        ReturnResult<bool> Delete(int id, bool state);

        /// <summary>
        /// 修改密码
        /// </summary>
        /// <param name="changePasswordDTO">要修改的密码信息</param>
        /// <returns>结果</returns>
        ReturnResult<bool> UpdatePassword(ChangePasswordDTO changePasswordDTO);

        /// <summary>
        /// 是否可用
        /// </summary>
        /// <param name="id">医生ID</param>
        /// <returns>结果</returns>
        ReturnResult IsEnabled(int id);
    }
}
